package supercafe.core;

import android.os.Parcel;
import android.os.Parcelable;

public class MenuItem implements Parcelable {
	int itemId;
	String itemName;
	int price;
	//boolean selected;
	public MenuItem(int itemId,String itemName,int price){
		this.itemId = itemId;
		this.itemName = itemName;
		this.price = price;
		//selected = false;
	}
	public MenuItem(int itemId,String itemName,int price,boolean selected){
		this.itemId = itemId;
		this.itemName = itemName;
		this.price = price;
		//this.selected = selected;
	}
	public int getMenuItemId(){
		return this.itemId;
	}
	public String getMenuItemName(){
		return this.itemName;
	}
	public int getMenuItemPrice() {
		return this.price;
	}
	/*public boolean isSelected() {
		return this.selected;
	}
	public void setSelected(boolean select){
		this.selected = select;
	}*/
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return itemId;
	}
	@Override
	public void writeToParcel(Parcel out, int flags) {
		// TODO Auto-generated method stub
		out.writeInt(this.itemId);
		out.writeString(this.itemName);
		out.writeInt(this.price);
	}
	
	public static final Parcelable.Creator<MenuItem> CREATOR = new Parcelable.Creator<MenuItem>() {
        public MenuItem createFromParcel(Parcel in) {
            return new MenuItem(in);
        }

        public MenuItem[] newArray(int size) {
            return new MenuItem[size];
        }
    };

    public MenuItem(Parcel in) {
        itemId = in.readInt();
        itemName = in.readString();
        price = in.readInt();
    }

}
